-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make accessible toolbar stable and deprecate old usage #23316
Conversation
Size Change: +579 B (0%) Total Size: 1.16 MB
ℹ️ View Unchanged
|
Cross-linking my comment #23615 (comment) in the tracking issue for experimental APIs. |
packages/block-editor/src/components/navigable-toolbar/index.js
Outdated
Show resolved
Hide resolved
This is actually an invalid warning as it may still be rendered inside <ToolbarGroup />
This is ready for review! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great for me.
I'd like to ensure that I understand the block author story better here (as I think it's important to include in the dev note). How does a block author add an accessible toolbar/buttons to its BlockControls?
If I'm understanding properly, there's no assumptation that a parent Toolbar exists, so we have to add a Toolbar
with its children, right? And if we want to add a single button, we just use Button
directly, right?
@youknowriad Not exactly. I updated the docs here so they're (hopefully) more clear regarding the usage of Basically you have to use either If you use
|
Closes #18619
Summary of changes in this PR:
__experimentalToolbarItem
component toToolbarItem
.Toolbar
's__experimentalAccessibilityLabel
prop tolabel
.Toolbar
when used without thelabel
prop (will still fallback toToolbarGroup
for backward compatibility).Toolbar
,ToolbarGroup
,ToolbarButton
andToolbarItem
components.How to test?
Make sure block toolbar and the top toolbar are working.